package mn.idax.exchange.otc.mapper;

import mn.idax.exchange.otc.entity.OTCBusinessApply;
import mn.idax.exchange.otc.entity.OTCBusinessApplyExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;
import java.util.Map;

/***
 * 商户申请映射
 * @author .shohua
 * @time 2018.11.13
 */
public interface OTCBusinessApplyMapper {

    int countByExample(OTCBusinessApplyExample example);

    int deleteByExample(OTCBusinessApplyExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(OTCBusinessApply record);

    int insertSelective(OTCBusinessApply record);

    List<OTCBusinessApply> selectByExampleWithRowbounds(OTCBusinessApplyExample example, RowBounds rowBounds);

    List<OTCBusinessApply> selectByExample(OTCBusinessApplyExample example);

    OTCBusinessApply selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") OTCBusinessApply record, @Param("example") OTCBusinessApplyExample example);

    int updateByExample(@Param("record") OTCBusinessApply record, @Param("example") OTCBusinessApplyExample example);

    int updateByPrimaryKeySelective(OTCBusinessApply record);

    int updateByPrimaryKey(OTCBusinessApply record);

    /**
     * 获取商户申请信息 BY 状态
     *
     * @param paramMap
     * @return
     */
    OTCBusinessApply getBusinessApplyByMap(Map<String, Integer> paramMap);

    /**
     * 插入商户申请信息
     *
     * @param businessApply
     * @return
     */
    int insertBusinessApply(OTCBusinessApply businessApply);

    /**
     * 获取商户申请列表
     *
     * @return
     */
    List<OTCBusinessApply> listBusinessApplyPage(Map<String, Integer> paramMap);

    Integer listBusinessApplyTotal(Integer userId);

    //是否是承兑商
    Integer isBusinesser(Integer userId);
}
